﻿namespace DimensionsHelper.LanguageService.Syntax;

public class LabelDeclaration : Declaration
{
    internal LabelDeclaration(Identifier labelIdentifier, SyntaxNode? parent)
        : base(SyntaxKinds.Label, SyntaxToken.Default, labelIdentifier, parent)
    {
    }


    public override void AcceptVisitor<T>(SyntaxNodeVisitor<T> visitor)
    {
        Accept(visitor, NameIdentifier);
    }
}


public static partial class NodeFactory
{
    public static LabelDeclaration CreateLabelDeclaration(SyntaxNode? parent, Identifier labelIdentifier)
    {
        return new LabelDeclaration(labelIdentifier, parent);
    }
}